/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mucp.server;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

/**
 *
 * @author niklas
 */
public class ServerThread extends Thread{
    private Socket socket = null;

    public ServerThread(Socket socket) {
	super("ServerThread");
	this.socket = socket;
    }

    @Override
    public void run() {

//	try {
//	    PrintWriter out = new PrintWriter(socket.getOutputStream(), true);
//	    BufferedReader in = new BufferedReader(
//				    new InputStreamReader(
//				    socket.getInputStream()));
//
//	    String inputLine, outputLine;
//	    KnockKnockProtocol kkp = new KnockKnockProtocol();
//	    outputLine = kkp.processInput(null);
//	    out.println(outputLine);
//
//	    while ((inputLine = in.readLine()) != null) {
//		outputLine = kkp.processInput(inputLine);
//		out.println(outputLine);
//		if (outputLine.equals("Bye"))
//		    break;
//	    }
//	    out.close();
//	    in.close();
//	    socket.close();
//
//	} catch (IOException e) {
//	    e.printStackTrace();
//	}
    }

}
